import {
	defineStore
} from 'pinia'
export const BluetoothStore = defineStore('bluetooth', {
	state: () => ({
		//缓存项目id 因为会与isItemOperator信息同步使用 就放在这了
		BluetoothInfo: {
			localName: null,
			uid: null,
			deviceId: null,
			serviceId: null,
			characteristicId: null
		}
	}),
	actions: {
		setDeviceInfo(info) {
			this.BluetoothInfo = {
				...info
			};
		},
		getDeviceInfo() {
			return this.BluetoothInfo || {};
		},
	}
})